//
//  CollectionTableViewCell.m
//  KeepFit
//
//  Created by 杨旭 on 15/11/7.
//  Copyright © 2015年 Fuzzie Liu. All rights reserved.
//

#import "CollectionTableViewCell.h"

@implementation CollectionTableViewCell

- (void)awakeFromNib {
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"back.jpg"]];
        [self.contentView addSubview:self.myImageView];
        
        self.myTextLabel = [[UILabel alloc] init];
        self.myTextLabel.textAlignment = NSTextAlignmentCenter;
        self.myTextLabel.textColor = [UIColor blackColor];
        self.myTextLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:self.myTextLabel];
        
        return self;
    }
    return nil;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.myImageView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width / 5, self.contentView.bounds.size.height);
    self.myTextLabel.frame = CGRectMake(self.contentView.bounds.size.width / 5, 0, self.contentView.bounds.size.width / 5 * 4, self.contentView.bounds.size.height);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
